<template>
  <el-dialog :title="title" :visible.sync="dialogVisible" :close-on-click-modal="false" width="860px" append-to-body>
    <div class="">
      <div class="table_box">
        <el-table border :data="tableData.records" style="width: 100%" stripe>
          
          <el-table-column prop="gameName" label="游戏" ></el-table-column>
          <el-table-column prop="accountNumber" label="游戏账号" ></el-table-column>
          <el-table-column prop="goodsId" label="商品编号" ></el-table-column>
          <el-table-column prop="phone" label="手机号" ></el-table-column>
          <el-table-column prop="createTime" label="时间" width="160"></el-table-column>
          <el-table-column prop="createName" label="操作人" ></el-table-column>
        </el-table>
        <pagination v-show="tableData.total > 0" :total="tableData.total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />

      </div>
    </div>
  </el-dialog>
</template>

<script>
import goodsListApi from "../../../api/gameConfig/goodsList";
export default {
  name: "",
  data() {
    return {
      dialogVisible: false,
      loading: false,
      title: "换绑记录",
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        goodsId:''
      },
      tableData: {
        records: [],
        total: 0,
      },
      timer: [],

      // 表单参数
      form: {
      },
      id:''
    };
  },
  created() {
  },
  // computed:{
  //   carrierTypes(){
  //     return this.$store.getters.gameYunyingshangList
  //   }
  // },
  methods: {
    // 打开弹窗
    open(id) {
      this.queryParams.goodsId = id
      this.dialogVisible = true;
      this.getList();
    },
    // // 重置
    // resetQuery() {
    //   this.queryParams = {
    //     pageNum: 1,
    //     pageSize: 10,
    //     phone:this.queryParams.phone
    //   };
    //   this.timer = []
    //   this.getList();
    // },
    getList() {
      this.tableData.records = []
      goodsListApi.getGoodsHuanbangjilu(this.queryParams).then((res) => {
        this.tableData.records = res.rows;
        this.tableData.total = res.total;
      });
    },
    // search(){
    //   this.queryParams.pageNum = 1
    //   this.getList();
    // },
    close() {
      this.dialogVisible = false;
    },
  },
};
</script>
<style scoped lang="css">
</style>
